package com.itheima.aop;

import org.aspectj.lang.ProceedingJoinPoint;

//1.制作通知类，在类中定义一个方法用于完成共性功能
public class AOPAdvice {

   /* public void function(){
        System.out.println("共性功能");
    }*/

    public  void  before(){
        System.out.println("before");
    }

    public  void  after(){
        System.out.println("after");
    }

    public  void  afterReturing(){
        System.out.println("afterReturing");
    }

    public  void  afterThrowing(){
        System.out.println("afterThrowing");
    }

    public  void  around(ProceedingJoinPoint pjp) throws Throwable {

        System.out.println("around.before");
        pjp.proceed();
        System.out.println("around.after");
    }
}
